Class PTPPortDataImpl

java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.PTPPortDataImpl
All Implemented Interfaces:
IPCObject, PTPPortData

public class PTPPortDataImpl extends IPCObjectImpl implements PTPPortData
Information provided by the PKI file:

    \class PTPPortData
    \brief This file holds CPTPPortData class declaration.
    \example IpcBase::cast<SwitchPort>(network().getDevice("Switch0").getPort("FastEthernet0/1")).getPtpPortData();
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • setPtpVersion

      public void setPtpVersion(int num)
      Information provided by the PKI file:
      
          \brief Sets ptp version.
          
          \param num, version number to use.
          
              
      Specified by:
      setPtpVersion in interface PTPPortData
      Parameters:
      num - Takes in a parameter of num
    • getPtpVersion

      public int getPtpVersion()
      Information provided by the PKI file:
      
          \brief Gets ptp version.
          
          \return int, version number.
          
              
      Specified by:
      getPtpVersion in interface PTPPortData
      Returns:
      int Returns a int
    • setPortState

      public void setPortState(PortState state)
      Information provided by the PKI file:
      
          \brief Sets the profile type.
          
          \param state, the port state to use.
          states:     eFaulty = 0,
          eInit = 1,
          eDisabled = 2,
          eListening = 3,
          eUncalibrated = 4,
          ePreMaster = 5,
          eSlave = 6,
          eMaster = 7,
          ePassive = 8
          
              
      Specified by:
      setPortState in interface PTPPortData
      Parameters:
      state - Takes in a parameter of state
    • getPortState

      public PortState getPortState()
      Information provided by the PKI file:
      
          \brief Gets the port state.
          
          \return  PortState, the profile type.
          Port states:        eFaulty = 0,
          eInit = 1,
          eDisabled = 2,
          eListening = 3,
          eUncalibrated = 4,
          ePreMaster = 5,
          eSlave = 6,
          eMaster = 7,
          ePassive = 8
          
              
      Specified by:
      getPortState in interface PTPPortData
      Returns:
      PortState Returns a PortState
    • getPortStateStr

      public String getPortStateStr()
      Information provided by the PKI file:
      
          \brief Returns the profile as a string.
          
          \return string,     profile strings:        "FAULTY",
          "INITIALIZING",
          "DISABLED",
          "LISTENING",
          "UNCALIBRATED",
          "PRE_MASTER",
          "SLAVE",
          "MASTER",
          "PASSIVE"
          
              
      Specified by:
      getPortStateStr in interface PTPPortData
      Returns:
      String Returns a String
    • setRecommendedPortState

      public void setRecommendedPortState(PortState state)
      Information provided by the PKI file:
      
          \brief Sets the recommended port state.
          
          \param state, the port state to use.
          states:     eFaulty = 0,
          eInit = 1,
          eDisabled = 2,
          eListening = 3,
          eUncalibrated = 4,
          ePreMaster = 5,
          eSlave = 6,
          eMaster = 7,
          ePassive = 8
          
              
      Specified by:
      setRecommendedPortState in interface PTPPortData
      Parameters:
      state - Takes in a parameter of state
    • getRecommendedPortState

      public PortState getRecommendedPortState()
      Information provided by the PKI file:
      
          \brief Gets the recommended port state.
          
          \return  PortState, the profile type.
          Port states:        eFaulty = 0,
          eInit = 1,
          eDisabled = 2,
          eListening = 3,
          eUncalibrated = 4,
          ePreMaster = 5,
          eSlave = 6,
          eMaster = 7,
          ePassive = 8
          
              
      Specified by:
      getRecommendedPortState in interface PTPPortData
      Returns:
      PortState Returns a PortState
    • setDelayRequestInterval

      public void setDelayRequestInterval(int num)
      Information provided by the PKI file:
      
          \brief Sets the delay request interval.
          
          \param num, the delay time in seconds
          
              
      Specified by:
      setDelayRequestInterval in interface PTPPortData
      Parameters:
      num - Takes in a parameter of num
    • getDelayRequestInterval

      public int getDelayRequestInterval()
      Information provided by the PKI file:
      
          \brief Gets the delay request interval.
          
          \return int, the delay request interval time in seconds.
          
              
      Specified by:
      getDelayRequestInterval in interface PTPPortData
      Returns:
      int Returns a int
    • setAnnounceReceiptTimeout

      public void setAnnounceReceiptTimeout(int num)
      Information provided by the PKI file:
      
          \brief Sets the announcement receipt timout time.
          
          \param num, the time.
          
              
      Specified by:
      setAnnounceReceiptTimeout in interface PTPPortData
      Parameters:
      num - Takes in a parameter of num
    • getAnnounceReceiptTimeout

      public int getAnnounceReceiptTimeout()
      Information provided by the PKI file:
      
          \brief Gets the announcement receipt timout time.
          
          \return int, the announcement receipt timout time.
          
              
      Specified by:
      getAnnounceReceiptTimeout in interface PTPPortData
      Returns:
      int Returns a int
    • setAnnounceInterval

      public void setAnnounceInterval(int num)
      Information provided by the PKI file:
      
          \brief Sets the announcement interval time.
          
          \param num, the time.
          
              
      Specified by:
      setAnnounceInterval in interface PTPPortData
      Parameters:
      num - Takes in a parameter of num
    • getAnnounceInterval

      public int getAnnounceInterval()
      Information provided by the PKI file:
      
          \brief Gets the announcement interval time.
          
          \return int, the announcement interval time.
          
              
      Specified by:
      getAnnounceInterval in interface PTPPortData
      Returns:
      int Returns a int
    • setSyncInterval

      public void setSyncInterval(int num)
      Information provided by the PKI file:
      
          \brief Sets the sync interval time.
          
          \param num, the time.
          
              
      Specified by:
      setSyncInterval in interface PTPPortData
      Parameters:
      num - Takes in a parameter of num
    • getSyncInterval

      public int getSyncInterval()
      Information provided by the PKI file:
      
          \brief Gets the sync interval time.
          
          \return int, the sync interval time.
          
              
      Specified by:
      getSyncInterval in interface PTPPortData
      Returns:
      int Returns a int
    • setSyncWaitLimit

      public void setSyncWaitLimit(long num)
      Information provided by the PKI file:
      
          \brief Sets the sync interval wait limit.
          
          \param num, the wait.
          
              
      Specified by:
      setSyncWaitLimit in interface PTPPortData
      Parameters:
      num - Takes in a parameter of num
    • getSyncWaitLimit

      public int getSyncWaitLimit()
      Information provided by the PKI file:
      
          \brief Gets the sync interval wait limit.
          
          \return int, the sync interval wait limit.
          
              
      Specified by:
      getSyncWaitLimit in interface PTPPortData
      Returns:
      int Returns a int
    • setSyncMsgCounter

      public void setSyncMsgCounter(int value)
      Information provided by the PKI file:
      
          \brief Sets the sync message counter.
          
          \param value, value to use.
          
              
      Specified by:
      setSyncMsgCounter in interface PTPPortData
      Parameters:
      value - Takes in a parameter of value
    • incrementSyncMsgCounter

      public void incrementSyncMsgCounter()
      Information provided by the PKI file:
      
          \brief Increments the sync message counter.
          
              
      Specified by:
      incrementSyncMsgCounter in interface PTPPortData
    • getSyncMsgCounter

      public int getSyncMsgCounter()
      Information provided by the PKI file:
      
          \brief Gets the sync message counter.
          
          \return int, value is the sync message count.
          
              
      Specified by:
      getSyncMsgCounter in interface PTPPortData
      Returns:
      int Returns a int
    • setDelayReqCounter

      public void setDelayReqCounter(int num)
      Information provided by the PKI file:
      
          \brief Sets the delay request counter.
          
          \param num, value to use.
          
              
      Specified by:
      setDelayReqCounter in interface PTPPortData
      Parameters:
      num - Takes in a parameter of num
    • incrementDelayReqCounter

      public void incrementDelayReqCounter()
      Information provided by the PKI file:
      
          \brief Increments the delay request counter.
          
              
      Specified by:
      incrementDelayReqCounter in interface PTPPortData
    • getDelayReqCounter

      public int getDelayReqCounter()
      Information provided by the PKI file:
      
          \brief Gets delay request count.
          
          \return int, the delay request count.
          
              
      Specified by:
      getDelayReqCounter in interface PTPPortData
      Returns:
      int Returns a int
    • setAnnounceSeqNum

      public void setAnnounceSeqNum(double num)
      Information provided by the PKI file:
      
          \brief Sets the announce sequence number counter.
          
          \param num, value to use.
          
              
      Specified by:
      setAnnounceSeqNum in interface PTPPortData
      Parameters:
      num - Takes in a parameter of num
    • getAnnounceSeqNum

      public double getAnnounceSeqNum()
      Information provided by the PKI file:
      
          \brief Gets the announce sequence number.
          
          \return double, value is the announce sequence number.
          
              
      Specified by:
      getAnnounceSeqNum in interface PTPPortData
      Returns:
      double Returns a double
    • setSyncSeqNum

      public void setSyncSeqNum(double num)
      Information provided by the PKI file:
      
          \brief Sets the sync sequence number.
          
          \param num, value to use.
          
              
      Specified by:
      setSyncSeqNum in interface PTPPortData
      Parameters:
      num - Takes in a parameter of num
    • getSyncSeqNum

      public double getSyncSeqNum()
      Information provided by the PKI file:
      
          \brief Gets the sync sequence number.
          
          \return double, value is the sync message count.
          
              
      Specified by:
      getSyncSeqNum in interface PTPPortData
      Returns:
      double Returns a double
    • setDecisionCode

      public void setDecisionCode(DecisionCode code)
      Information provided by the PKI file:
      
          \brief Sets the decision code.
          
          \param code, the code to use.
          codes:      None = 0,
          M1 = 1,
          M2 = 2,
          M3 = 3,
          P1 = 4,
          P2 = 5,
          S1 = 6
          
              
      Specified by:
      setDecisionCode in interface PTPPortData
      Parameters:
      code - Takes in a parameter of code
    • getDecisionCode

      public DecisionCode getDecisionCode()
      Information provided by the PKI file:
      
          \brief Gets the recommended port state.
          
          \return  DecisionCode,      the profile type.
          Decision codes:             None = 0,
          M1 = 1,
          M2 = 2,
          M3 = 3,
          P1 = 4,
          P2 = 5,
          S1 = 6
          
              
      Specified by:
      getDecisionCode in interface PTPPortData
      Returns:
      DecisionCode Returns a DecisionCode
    • setLastSyncSeqNum

      public void setLastSyncSeqNum(double num)
      Information provided by the PKI file:
      
          \brief Sets the last sync sequence number.
          
          \param num, value to use.
          
              
      Specified by:
      setLastSyncSeqNum in interface PTPPortData
      Parameters:
      num - Takes in a parameter of num
    • getLastSyncSeqNum

      public double getLastSyncSeqNum()
      Information provided by the PKI file:
      
          \brief Gets the last sync sequence number.
          
          \return double, value is the last sync sequence number.
          
              
      Specified by:
      getLastSyncSeqNum in interface PTPPortData
      Returns:
      double Returns a double
    • setLastGeneralEventSeqNum

      public void setLastGeneralEventSeqNum(double num)
      Information provided by the PKI file:
      
          \brief Sets the last known general event sequence number.
          
          \param num, value to use.
          
              
      Specified by:
      setLastGeneralEventSeqNum in interface PTPPortData
      Parameters:
      num - Takes in a parameter of num
    • getLastGeneralEventSeqNum

      public double getLastGeneralEventSeqNum()
      Information provided by the PKI file:
      
          \brief Gets the last general event sequence number.
          
          \return double, value is the last sync sequence number.
          
              
      Specified by:
      getLastGeneralEventSeqNum in interface PTPPortData
      Returns:
      double Returns a double
    • setBustEnabled

      public void setBustEnabled(boolean enable)
      Information provided by the PKI file:
      
          \brief Sets bust to be enabled or disabled.
          
          \param enable, true to enable, false to disable.
          
              
      Specified by:
      setBustEnabled in interface PTPPortData
      Parameters:
      enable - Takes in a parameter of enable
    • isBustEnabled

      public boolean isBustEnabled()
      Information provided by the PKI file:
      
          \brief Gets bust enabled state.
          
          \return bool, returns true if bust is enabled, false if not.
          
              
      Specified by:
      isBustEnabled in interface PTPPortData
      Returns:
      boolean Returns a boolean
    • removeForeignMasterBySrcPortId

      public boolean removeForeignMasterBySrcPortId(String uuid, int portNum)
      Information provided by the PKI file:
      
          \brief Removes a foreign master by port.
          
          \param uuid, uuid to find for.
          \param portNum, port to find for.
          
          \return bool, value is true if the foreign master as removed, false if not.
          
              
      Specified by:
      removeForeignMasterBySrcPortId in interface PTPPortData
      Parameters:
      uuid - Takes in a parameter of uuid
      portNum - Takes in a parameter of portNum
      Returns:
      boolean Returns a boolean
    • clearForeignMasterList

      public void clearForeignMasterList()
      Information provided by the PKI file:
      
          \brief Removes all the foreign masters.
          
              
      Specified by:
      clearForeignMasterList in interface PTPPortData
    • setEBestSrc

      public void setEBestSrc(boolean value)
      Information provided by the PKI file:
      
          \brief Sets the port data to be or not to be the best source for grandmaster clock
          
          \param value, true if the port data is the best source for grandmaster clock and false otherwise.
          
              
      Specified by:
      setEBestSrc in interface PTPPortData
      Parameters:
      value - Takes in a parameter of value
    • isEBestSrc

      public boolean isEBestSrc()
      Information provided by the PKI file:
      
          \brief Check if this port data is the best source for grandmaster clock
          
          \return value, true if it is and false otherwise.
          
              
      Specified by:
      isEBestSrc in interface PTPPortData
      Returns:
      boolean Returns a boolean
    • resetDatasetToDefault

      public void resetDatasetToDefault()
      Information provided by the PKI file:
      
          \brief Resets the data set to default.
          
              
      Specified by:
      resetDatasetToDefault in interface PTPPortData
    • cancelTimer

      public void cancelTimer()
      Information provided by the PKI file:
      
          \brief Cancels the timer.
          
              
      Specified by:
      cancelTimer in interface PTPPortData
    • clearConfig

      public void clearConfig()
      Information provided by the PKI file:
      
          \brief Clears the config.
          
              
      Specified by:
      clearConfig in interface PTPPortData